package com.portico.dept.solarch

import com.portico.security.User

class RegisterUserController {

  def register = {
    if (params.register) {
      def userInstance = new User()
      userInstance.properties = params
      if (userInstance.save(flush: true)) {
        redirect(controller: "login", action: "auth")
      } else {
       render (view:"register", model: [userInstance: userInstance])        
      }
    }
  }
}